﻿//@descrip: 旧方法的兼容

@mixin ex-reset(){
    @if fix(pc) {
        html{ color:$g0; background:$gf;-webkit-text-size-adjust:none; }
        body,
        dl, dt, dd, ul, ol, li,
        h1, h2, h3, h4, h5, h6,
        p, pre, code, blockquote,
        form, fieldset, legend, input, button, textarea,
        th, td {margin:0;padding:0;}
        table {border-collapse:separate;border-spacing:0;}
        fieldset, img, iframe{border:0 none;}
        img[src] {@include zoom-img;}
        iframe{display:block;}

        address, caption, cite, code, dfn, var,
        em, i, strong,
        th, td {font-style:normal;font-weight:normal;}

        li {list-style:none;}

        caption,
        th {text-align:left;}
        h1, h2, h3, h4, h5, h6 {font-size:100%;font-weight:normal;}
        q:before, q:after {content:'';}
        abbr, acronym {border:0;font-variant:normal;}

        sup { vertical-align:text-top; }
        sub { vertical-align:text-bottom; }
        input, textarea, select {font-family:inherit;font-size:inherit;font-weight:inherit;*font-size:100%;}
        button,
        input[type=reset], input[type=button], input[type=submit], input[type=file] > input[type=button] {
            &::-moz-focus-inner{
                border:0 none; padding:0;
            }
        }
        :active{outline:0;}

        legend {color:$g0;}
    }@else if fix(mobile) {
        html{ color:$g0; background:$gf;-webkit-text-size-adjust:none; }
        body,
        dl, dt, dd, ul, ol, li,
        h1, h2, h3, h4, h5, h6,
        p, pre, code, blockquote,
        form, fieldset, legend, input, button, textarea,
        th, td {margin:0;padding:0;}
        table {border-collapse:separate;border-spacing:0;}
        fieldset, img, iframe{border:0 none;}
        iframe{display:block;}

        address, caption, cite, code, dfn, var,
        em, i, strong,
        th, td {font-style:normal;font-weight:normal;}

        li {list-style:none;}

        caption, th {text-align:left;}
        h1, h2, h3, h4, h5, h6 {font-size:100%;font-weight:normal;}
        q:before, q:after {content:'';}
        abbr, acronym {border:0;font-variant:normal;}

        sup { vertical-align:text-top; }
        sub { vertical-align:text-bottom; }
        input, textarea, select {font-family:inherit;font-size:inherit;font-weight:inherit;outline:0 none;}
        legend {color:$g0;}
    }
}

@mixin ex-container($width: $default-container-width, $margin: 0) {
	@include container($width,$margin);
}
@mixin ex-float ($value: left, $hack: true) {
	@include float($value,$hack);
}
@mixin ex-clear($way: $default-clear){
	@include clear($way);
}
@mixin ex-inline-block($vertical:false, $hack: true) {
	@include inline-block($vertical, $hack);
}
@mixin ex-border-radius($value...){
	@include border-radius($value);
}
@mixin ex-box-shadow($value...) {
	@include box-shadow($value);
}
@mixin ex-linear-gradient($colors:$gf, $ms: false, $horizonral:false) {
    @include linear-gradient($colors, $ms, $horizonral, background-image);
}
@mixin ex-opacity($value:$default-opacity){
	@include opacity($value);
}
@mixin ex-isometric($width,$NO,$padding-top: 0,$padding-right: 0,$padding-bottom: 0,$padding-left: 0,$margin-top: 0,$margin-right: 0,$margin-bottom: 0,$margin-left: 0){
	@include isometric($width,$NO,$padding-top,$padding-right,$padding-bottom,$padding-left,$margin-top,$margin-right,$margin-bottom,$margin-left);
}
@mixin ex-width($value: $default-box-size, $hack:false, $type:''){
	@include width($value, $hack,$type);
}
@mixin ex-line-height($value: $default-line-height, $hack: false, $type: ''){
	@include line-height($value, $hack, $type);
}
@mixin ex-height($value: $default-box-size, $line-height:true, $hack:true, $hack-line:false, $type:''){
	@include height($value, $line-height, $hack, $hack-line, $type);
}
@mixin ex-overflow($axis: all,$way: $default-overflow){
	@include overflow($axis,$way);
}
@mixin ex-box($width:$default-box-size, $height:false, $line:false, $overflow: false, $border:false, $background: false, $display:false, $hack-width:false, $hack-height:false, $hack-line:false, $type:'_') {
	@include box($width, $height, $line, $overflow, $border, $background, $display, $hack-width, $hack-height, $hack-line, $type);
}
@mixin ex-background($value){
	@include background($value);
}
@mixin ex-border($color:$default-border-color, $width:$default-border-width, $style:$default-border-style){
	@include border($color, $width, $style);
}
@mixin ex-padding($value:$default-padding, $merge:true, $hack:false) {
	@include padding($value, $merge, $hack);
}
@mixin ex-margin($value:$default-margin, $merge:true, $hack:false) {
	@include margin($value, $merge, $hack);
}
@mixin ex-position($pos:$default-position, $direct:false, $value:$default-position, $z:false, $l:false, $t:false, $r:false, $b:false) {
	@include position($pos,$direct, $value, $z, $l, $t, $r, $b);
}
@mixin ex-display($value) {
	@include display($value);
}
@mixin ex-rect($width:false, $height:false, $padding: false, $margin: false, $float:false, $line:false, $border: false, $background:false, $display: false, $overflow:false, $radius: false, $shadow:false, $position:false, $z-index:false, $opacity:false) {
	@include rect($width, $height, $padding, $margin, $float, $line, $border, $background, $display, $overflow, $position, $z-index, $opacity, $radius, $shadow);
}
@mixin ex-text-overflow($width: $default-width,$height: false,$line-height: false){
	@include text-overflow($width,$height,$line-height);
}
@mixin ex-transition($pro: $default-pro, $time: $default-time, $eff: $default-eff){
	@include transition($pro, $time, $eff);
}

//= arrow with diamond
@mixin arrow-old($size: 4px, $border:#FEBF0F,$bg:$gf){
    $width: 18px;
    $height: 12px;
    $direct: if($direct == all, left right top bottom, $direct);
    .arrow{
        position: absolute;overflow: hidden;font:$width/#{$width} simsun;
        i{position: absolute;}
        .below{color:$border;}
        .above{color:$bg;}
    }
    .arrow-left{
        width:$height;height:$width;top:0;left:-$height;
        .above{margin-left:$size;}
    }
    .arrow-right{
        width:$height;height:$width;top:0;right:-$height;
        .below{margin-left:-6px;}
        .above{margin-left:-(6px + $size);}
    }
    .arrow-top{
        width:$width;height:$height - 1;left:0;top:- ($height - 1);
        .above{margin-top:$size;}
    }
    .arrow-bottom{
        width:$width;height:$height;left:0;bottom:-$height;
        .below{margin-top:-5px;}
        .above{margin-top:-(5px + $size);}
    }
}
